<?php
class common_addressbook_concept extends system_concept_abstract {
	
	public function init() {
		$this->setRowClass('common_addressbook_row');	
		$this->setModel('common_addressbook_model', 'addressbook');
		$this->setJoinLeftModel('common_region_zone_model', 'zone.id = addressbook.location_id', 'zone');
		$this->setJoinLeftModel('common_region_city_model', 'city.id = zone.city_id', 'city');
		$this->setJoinLeftModel('common_region_model', 'province.id = city.province_id', 'province');
		$this->setModelCols('addressbook', array('id', 'type', 'primary_id', 'label', 'name', 'nickname', 'location_id', 'address'));
		$this->setModelCols('addressbook', array('email', 'phone', 'mobile', 'fax', 'other', 'description', 'creationtime', 'modifiedtime'));
		
		$this->setModelCols('province', array('name' => 'province_name'));
		$this->setModelCols('city', array('name' => 'city_name'));
		$this->setModelCols('zone', array('name' => 'zone_name', 'zipcode', 'areacode'));
	}


}